<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>



<html>
<head>
<title></title>
<style type="text/css">
.style1 {
	width: 203px;
}

#Text9 {
	height: 50px;
	width: 500px;
}

#Text10 {
	width: 500px;
	height: 70px;
}

#Text11 {
	height: 50px;
	width: 500px;
}

.style2 {
	width: 100px;
}
</style>
</head>
<body>
<%@ include file="head.jsp"%>
	<form action="/CA_Project/ManagerPage" method="post">
	<input type="hidden" name = "ApplicantID" value = "${LeaveInfo._userID}">
	<input type="hidden" name = "LeaveID" value = "${LeaveInfo._leaveID}">
		<table>
			<tr>
				<td>Applicant Name:</td>
				<td><input type="text" name="userName"
					value="${LeaveInfo._userName}" readonly = "readonly"/></td>
				<td>Application Date:</td>
				<td><input type="text" name="applicationDate"
					value="${LeaveInfo._applicationDate}" readonly = "readonly" /></td>
			</tr>
			<tr>
				<td>Application Manager:</td>
				<td><input type="text" name="approvingManID"
					value="${LeaveInfo._ApprovingManID}" readonly = "readonly" /></td>
				<td>Duration:</td>
				<td><input type="text" name="duration" value="${LeaveInfo._duration} " /></td>
			</tr>
			<tr>
				<td>Leave Type:</td>
				<td><input type="text" name="leavetype"
					value="${LeaveInfo._leaveType}" readonly = "readonly" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td>Status:</td>
				<td><input type="text" name="status"
					value="${LeaveInfo._status}" readonly = "readonly" /></td>
			</tr>
			<tr>
				<td>Start Date:</td>
				<td><input type="text" name="startdate"
					value="${LeaveInfo._startDate}" readonly = "readonly" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td>End Date:</td>
				<td><input type="text" name="enddate"
					value="${LeaveInfo._endDate}" readonly = "readonly" /></td>
			</tr>

			<tr>
				<td>Word Dissmenation: <br>
				<input type="text" name="workDissmination"
					value="${LeaveInfo._workDissemination}" readonly = "readonly" /></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>Reason:<br>
				<input type="text" name="reason" value="${LeaveInfo._reason}" readonly = "readonly" /></td>
				<td>Leave Persons:<br> 
				<c:forEach
						items="${requestScope.Leaveserchinfo}" var="Leave">
						<tr>
							<td>${Leave._userName}</td>


						</tr>
					</c:forEach>


				</td>
				<td></td>
			</tr>
			<tr>
				<td>Reject Due To:<br>
				<input type="text" name="rejectreason" value="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td></td>
				<td></td>
			</tr>
			<c:choose>
				<c:when test="${LeaveInfo._status != 'Pending'}">
					<tr>
						<td><input type="submit" name="approve" value="Approve" disabled="disabled"/></td>
						<td><input type="submit" name="cancle" value="Reject" disabled="disabled"/></td>
						<td></td>
					</tr>				
				</c:when>
				<c:otherwise>
					<tr>
						<td><input type="submit" name="approve" value="Approve" /></td>
						<td><input type="submit" name="cancle" value="Reject" /></td>
						<td></td>
					</tr>					
				</c:otherwise>
			
			</c:choose>
		</table>
	</form>
</body>
</html>